janpio closed pull request #133: Added LaunchImageFileCustom for hybrid app and multiples Launch Images URL: https://github.com/apache/cordova-plugin-splashscreen/pull/133
This is a PR merged from a forked repository. As GitHub hides the original diff on merge, it is displayed below for the sake of provenance: As this is a foreign pull request (from a fork), the diff is supplied below (as it won't show otherwise due to GitHub magic): diff --git a/cordova-plugin-splashscreen.podspec b/cordova-plugin-splashscreen.podspec new file mode 100644 index 00000000..49d4a331 --- /dev/null +++ b/cordova-plugin-splashscreen.podspec @@ -0,0 +1,128 @@ +# +# Be sure to run `pod spec lint cordova-plugin-splashscreen.podspec' to ensure this is a +# valid spec and to remove all comments including this before submitting the spec. +# +# To learn more about Podspec attributes see http://docs.cocoapods.org/specification.html +# To see working Podspecs in the CocoaPods repo see https://github.com/CocoaPods/Specs/ +# + +Pod::Spec.new do |s| + + # ――― Spec Metadata ―――――――――――――――――――――――――――――――――――――――――――――――――――――――――― # + # + # These will help people to find your library, and whilst it + # can feel like a chore to fill in it's definitely to your advantage. The + # summary should be tweet-length, and the description more in depth. + # + + s.name = "cordova-plugin-splashscreen" + s.version = "4.0.3" + s.summary = "This plugin is required to work with splash screens. This plugin displays and hides a splash screen during application launch." + + s.description = <<-DESC + A longer description of cordova-plugin-splashscreen in Markdown format. + * This plugin is required to work with splash screens. This plugin displays and hides a splash screen during application launch. + DESC + + s.homepage = "https://github.com/adelmojunnior/cordova-plugin-splashscreen" + # s.screenshots = "www.example.com/screenshots_1.gif", "www.example.com/screenshots_2.gif" + + + # ――― Spec License ――――――――――――――――――――――――――――――――――――――――――――――――――――――――――― # + # + # Licensing your code is important. See http://choosealicense.com for more info. + # CocoaPods will detect a license file if there is a named LICENSE* + # Popular ones are 'MIT', 'BSD' and 'Apache License, Version 2.0'. + # + + s.license = { :type => "MIT", :text => "License" } + # s.license = { :type => "MIT", :file => "FILE_LICENSE" } + + + # ――― Author Metadata ――――――――――――――――――――――――――――――――――――――――――――――――――――――――― # + # + # Specify the authors of the library, with email addresses. Email addresses + # of the authors are extracted from the SCM log. E.g. $ git log. CocoaPods also + # accepts just a name if you'd rather not provide an email address. + # + # Specify a social_media_url where others can refer to, for example a twitter + # profile URL. + # + + s.author = { "Adelmo Freitas" => "[email protected]" } + + # ――― Platform Specifics ――――――――――――――――――――――――――――――――――――――――――――――――――――――― # + # + # If this Pod runs only on iOS or OS X, then specify the platform and + # the deployment target. You can optionally include the target after the platform. + # + + # s.platform = :ios + s.platform = :ios + + # When using multiple platforms + s.ios.deployment_target = "8.0" + # s.osx.deployment_target = "10.7" + + + # ――― Source Location ―――――――――――――――――――――――――――――――――――――――――――――――――――――――――― # + # + # Specify the location from where the source should be retrieved. + # Supports git, hg, bzr, svn and HTTP. + # + + s.source = { :git => "https://github.com/adelmojunnior/cordova-plugin-splashscreen.git", :tag => "#{s.version}" } + + + # ――― Source Code ―――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――― # + # + # CocoaPods is smart about how it includes source code. For source files + # giving a folder will include any h, m, mm, c & cpp files. For header + # files it will include any header in the folder. + # Not including the public_header_files will make all headers public. + # + + s.source_files = "src/ios/*.{h,m}" + # s.exclude_files = "Classes/Exclude" + # s.public_header_files = "Classes/**/*.h" + + + # ――― Resources ―――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――― # + # + # A list of resources included with the Pod. These are copied into the + # target bundle with a build phase script. Anything else will be cleaned. + # You can preserve files from being cleaned, please don't preserve + # non-essential files like tests, examples and documentation. + # + + # s.resource = "icon.png" + # s.resources = "Resources/*.png" + + # s.preserve_paths = "FilesToSave", "MoreFilesToSave" + + + # ――― Project Linking ―――――――――――――――――――――――――――――――――――――――――――――――――――――――――― # + # + # Link your library with frameworks, or libraries. Libraries do not include + # the lib prefix of their name. + # + + # s.framework = "SomeFramework" + # s.frameworks = "SomeFramework", "AnotherFramework" + + # s.library = "iconv" + # s.libraries = "iconv", "xml2" + + + # ――― Project Settings ――――――――――――――――――――――――――――――――――――――――――――――――――――――――― # + # + # If your library depends on compiler flags you can set them in the xcconfig hash + # where they will only apply to your library. If you depend on other Podspecs + # you can include multiple dependencies to ensure it works. + + # s.requires_arc = true + + # s.xcconfig = { "HEADER_SEARCH_PATHS" => "$(SDKROOT)/usr/include/libxml2" } + s.dependency "Cordova", "~> 4.4.0" + +end \ No newline at end of file diff --git a/package.json b/package.json index 27c9f825..d5d5ddbf 100644 --- a/package.json +++ b/package.json @@ -1,64 +1,64 @@ { - "name": "cordova-plugin-splashscreen", - "version": "4.0.4-dev", - "description": "Cordova Splashscreen Plugin", - "types": "./types/index.d.ts", - "cordova": { - "id": "cordova-plugin-splashscreen", - "platforms": [ - "android", - "amazon-fireos", - "ubuntu", - "ios", - "blackberry10", - "wp8", - "windows8", - "windows", - "tizen" - ] - }, - "repository": { - "type": "git", - "url": "https://github.com/apache/cordova-plugin-splashscreen" - }, - "bugs": { - "url": "https://issues.apache.org/jira/browse/CB" - }, - "keywords": [ - "cordova", - "splashscreen", - "ecosystem:cordova", - "cordova-android", - "cordova-amazon-fireos", - "cordova-ubuntu", - "cordova-ios", - "cordova-blackberry10", - "cordova-wp8", - "cordova-windows8", - "cordova-windows", - "cordova-tizen" - ], - "scripts": { - "test": "npm run jshint", - "jshint": "node node_modules/jshint/bin/jshint www && node node_modules/jshint/bin/jshint src && node node_modules/jshint/bin/jshint tests" - }, - "engines": { - "cordovaDependencies": { - "2.0.0": { - "cordova-android": ">=3.6.0" - }, - "4.0.0": { - "cordova-android": ">=3.6.0", - "cordova-windows": ">=4.4.0" - }, - "5.0.0": { - "cordova": ">100" - } + "name": "cordova-plugin-splashscreen", + "version": "4.0.3", + "description": "Cordova Splashscreen Plugin", + "types": "./types/index.d.ts", + "cordova": { + "id": "cordova-plugin-splashscreen", + "platforms": [ + "android", + "amazon-fireos", + "ubuntu", + "ios", + "blackberry10", + "wp8", + "windows8", + "windows", + "tizen" + ] + }, + "repository": { + "type": "git", + "url": "https://github.com/adelmojunnior/cordova-plugin-splashscreen" + }, + "bugs": { + "url": "https://issues.apache.org/jira/browse/CB" + }, + "keywords": [ + "cordova", + "splashscreen", + "ecosystem:cordova", + "cordova-android", + "cordova-amazon-fireos", + "cordova-ubuntu", + "cordova-ios", + "cordova-blackberry10", + "cordova-wp8", + "cordova-windows8", + "cordova-windows", + "cordova-tizen" + ], + "scripts": { + "test": "npm run jshint", + "jshint": "node node_modules/jshint/bin/jshint www && node node_modules/jshint/bin/jshint src && node node_modules/jshint/bin/jshint tests" + }, + "engines": { + "cordovaDependencies": { + "2.0.0": { + "cordova-android": ">=3.6.0" + }, + "4.0.0": { + "cordova-android": ">=3.6.0", + "cordova-windows": ">=4.4.0" + }, + "5.0.0": { + "cordova": ">100" + } + } + }, + "author": "Apache Software Foundation", + "license": "Apache-2.0", + "devDependencies": { + "jshint": "^2.6.0" } - }, - "author": "Apache Software Foundation", - "license": "Apache-2.0", - "devDependencies": { - "jshint": "^2.6.0" - } -} +} \ No newline at end of file diff --git a/src/ios/CDVSplashScreen.m b/src/ios/CDVSplashScreen.m index ab97055a..cbfc22ef 100644 --- a/src/ios/CDVSplashScreen.m +++ b/src/ios/CDVSplashScreen.m @@ -189,8 +189,8 @@ - (BOOL) isUsingCDVLaunchScreen { - (NSString*)getImageName:(UIInterfaceOrientation)currentOrientation delegate:(id<CDVScreenOrientationDelegate>)orientationDelegate device:(CDV_iOSDevice)device { - // Use UILaunchImageFile if specified in plist. Otherwise, use Default. - NSString* imageName = [[NSBundle mainBundle] objectForInfoDictionaryKey:@"UILaunchImageFile"]; + // Use LaunchImageFileCustom if specified in plist. Otherwise, use UILaunchImageFile (Launch Image), otherwise Default. + NSString* imageName = [[NSBundle mainBundle] objectForInfoDictionaryKey:@"LaunchImageFileCustom"] ? [[NSBundle mainBundle] objectForInfoDictionaryKey:@"LaunchImageFileCustom"] : [[NSBundle mainBundle] objectForInfoDictionaryKey:@"UILaunchImageFile"]; // detect if we are using CB-9762 Launch Storyboard; if so, return the associated image instead if ([self isUsingCDVLaunchScreen]) { ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: [email protected] With regards, Apache Git Services --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
