diff --git a/Examples/SwiftExample/SwiftExample.xcodeproj/project.pbxproj b/Examples/SwiftExample/SwiftExample.xcodeproj/project.pbxproj index baa6312..4d6e640 100644 --- a/Examples/SwiftExample/SwiftExample.xcodeproj/project.pbxproj +++ b/Examples/SwiftExample/SwiftExample.xcodeproj/project.pbxproj @@ -7,13 +7,16 @@ objects = { /* Begin PBXBuildFile section */ - 5E19A4E92B71A0950056D784 /* messenger-sdk-ios in Frameworks */ = {isa = PBXBuildFile; productRef = 5E19A4E82B71A0950056D784 /* messenger-sdk-ios */; }; 5E19F5942B477AE400E37F55 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5E19F5932B477AE400E37F55 /* AppDelegate.swift */; }; 5E19F5962B477AE400E37F55 /* SceneDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5E19F5952B477AE400E37F55 /* SceneDelegate.swift */; }; 5E19F5982B477AE400E37F55 /* ViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5E19F5972B477AE400E37F55 /* ViewController.swift */; }; 5E19F59B2B477AE400E37F55 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 5E19F5992B477AE400E37F55 /* Main.storyboard */; }; 5E19F59D2B477AE400E37F55 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 5E19F59C2B477AE400E37F55 /* Assets.xcassets */; }; 5E19F5A02B477AE400E37F55 /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 5E19F59E2B477AE400E37F55 /* LaunchScreen.storyboard */; }; + 5E66BF0C2B7FB63100FAF349 /* messenger-sdk-ios in Frameworks */ = {isa = PBXBuildFile; productRef = 5E66BF0B2B7FB63100FAF349 /* messenger-sdk-ios */; }; + 5EE6D3A52BA3196B008A6DD3 /* GoogleService-Info.plist in Resources */ = {isa = PBXBuildFile; fileRef = 5EE6D3A42BA3196B008A6DD3 /* GoogleService-Info.plist */; }; + 5EF899182B728D75005547BC /* FirebaseAnalytics in Frameworks */ = {isa = PBXBuildFile; productRef = 5EF899172B728D75005547BC /* FirebaseAnalytics */; }; + 5EF899422B728D75005547BC /* FirebaseMessaging in Frameworks */ = {isa = PBXBuildFile; productRef = 5EF899412B728D75005547BC /* FirebaseMessaging */; }; /* End PBXBuildFile section */ /* Begin PBXCopyFilesBuildPhase section */ @@ -38,6 +41,8 @@ 5E19F59C2B477AE400E37F55 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; 5E19F59F2B477AE400E37F55 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; 5E19F5A12B477AE400E37F55 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; + 5EE6D3A42BA3196B008A6DD3 /* GoogleService-Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = "GoogleService-Info.plist"; path = "../../../Downloads/GoogleService-Info.plist"; sourceTree = ""; }; + 5EF898E22B726952005547BC /* SwiftExample.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = SwiftExample.entitlements; sourceTree = ""; }; /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ @@ -45,7 +50,9 @@ isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( - 5E19A4E92B71A0950056D784 /* messenger-sdk-ios in Frameworks */, + 5EF899182B728D75005547BC /* FirebaseAnalytics in Frameworks */, + 5EF899422B728D75005547BC /* FirebaseMessaging in Frameworks */, + 5E66BF0C2B7FB63100FAF349 /* messenger-sdk-ios in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -71,6 +78,7 @@ 5E19F5922B477AE400E37F55 /* SwiftExample */ = { isa = PBXGroup; children = ( + 5EF898E22B726952005547BC /* SwiftExample.entitlements */, 5E19F5932B477AE400E37F55 /* AppDelegate.swift */, 5E19F5952B477AE400E37F55 /* SceneDelegate.swift */, 5E19F5972B477AE400E37F55 /* ViewController.swift */, @@ -78,6 +86,7 @@ 5E19F59C2B477AE400E37F55 /* Assets.xcassets */, 5E19F59E2B477AE400E37F55 /* LaunchScreen.storyboard */, 5E19F5A12B477AE400E37F55 /* Info.plist */, + 5EE6D3A42BA3196B008A6DD3 /* GoogleService-Info.plist */, ); path = SwiftExample; sourceTree = ""; @@ -100,7 +109,9 @@ ); name = SwiftExample; packageProductDependencies = ( - 5E19A4E82B71A0950056D784 /* messenger-sdk-ios */, + 5EF899172B728D75005547BC /* FirebaseAnalytics */, + 5EF899412B728D75005547BC /* FirebaseMessaging */, + 5E66BF0B2B7FB63100FAF349 /* messenger-sdk-ios */, ); productName = SwiftExample; productReference = 5E19F5902B477AE400E37F55 /* SwiftExample.app */; @@ -131,7 +142,8 @@ ); mainGroup = 5E19F5872B477AE400E37F55; packageReferences = ( - 5E19A4E72B71A0950056D784 /* XCRemoteSwiftPackageReference "messenger-sdk-ios" */, + 5EF899162B728D75005547BC /* XCRemoteSwiftPackageReference "firebase-ios-sdk" */, + 5E66BF0A2B7FB63100FAF349 /* XCRemoteSwiftPackageReference "messenger-sdk-ios" */, ); productRefGroup = 5E19F5912B477AE400E37F55 /* Products */; projectDirPath = ""; @@ -148,6 +160,7 @@ buildActionMask = 2147483647; files = ( 5E19F5A02B477AE400E37F55 /* LaunchScreen.storyboard in Resources */, + 5EE6D3A52BA3196B008A6DD3 /* GoogleService-Info.plist in Resources */, 5E19F59D2B477AE400E37F55 /* Assets.xcassets in Resources */, 5E19F59B2B477AE400E37F55 /* Main.storyboard in Resources */, ); @@ -307,34 +320,39 @@ buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; + CODE_SIGN_ENTITLEMENTS = SwiftExample/SwiftExample.entitlements; + CODE_SIGN_IDENTITY = "Apple Development"; CODE_SIGN_STYLE = Automatic; - CURRENT_PROJECT_VERSION = 1; - DEVELOPMENT_TEAM = 49M8DX7784; + CURRENT_PROJECT_VERSION = 2; + DEVELOPMENT_TEAM = HC9N5Z797X; FRAMEWORK_SEARCH_PATHS = ( "$(inherited)", "$(PROJECT_DIR)/SwiftExample", ); GENERATE_INFOPLIST_FILE = YES; INFOPLIST_FILE = SwiftExample/Info.plist; + INFOPLIST_KEY_NSCameraUsageDescription = "This app requires camera access to take photos for uploading images directly from the camera."; + INFOPLIST_KEY_NSMicrophoneUsageDescription = "This app requires microphone access to record audio for video uploads directly from the camera."; INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents = YES; INFOPLIST_KEY_UILaunchStoryboardName = LaunchScreen; INFOPLIST_KEY_UIMainStoryboardFile = Main; - INFOPLIST_KEY_UISupportedInterfaceOrientations = UIInterfaceOrientationPortrait; + INFOPLIST_KEY_UISupportedInterfaceOrientations_iPad = UIInterfaceOrientationPortrait; IPHONEOS_DEPLOYMENT_TARGET = 13.0; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", "@executable_path/Frameworks", ); MARKETING_VERSION = 0.0.1; - PRODUCT_BUNDLE_IDENTIFIER = com.SwiftExample; + PRODUCT_BUNDLE_IDENTIFIER = HC9N5Z797X.com.deskpro.mobile.ios; PRODUCT_NAME = "$(TARGET_NAME)"; + PROVISIONING_PROFILE_SPECIFIER = ""; SUPPORTED_PLATFORMS = "iphoneos iphonesimulator"; SUPPORTS_MACCATALYST = NO; SUPPORTS_MAC_DESIGNED_FOR_IPHONE_IPAD = NO; SUPPORTS_XR_DESIGNED_FOR_IPHONE_IPAD = NO; SWIFT_EMIT_LOC_STRINGS = YES; SWIFT_VERSION = 5.0; - TARGETED_DEVICE_FAMILY = "1,2"; + TARGETED_DEVICE_FAMILY = 1; }; name = Debug; }; @@ -343,34 +361,39 @@ buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; + CODE_SIGN_ENTITLEMENTS = SwiftExample/SwiftExample.entitlements; + CODE_SIGN_IDENTITY = "Apple Development"; CODE_SIGN_STYLE = Automatic; - CURRENT_PROJECT_VERSION = 1; - DEVELOPMENT_TEAM = 49M8DX7784; + CURRENT_PROJECT_VERSION = 2; + DEVELOPMENT_TEAM = HC9N5Z797X; FRAMEWORK_SEARCH_PATHS = ( "$(inherited)", "$(PROJECT_DIR)/SwiftExample", ); GENERATE_INFOPLIST_FILE = YES; INFOPLIST_FILE = SwiftExample/Info.plist; + INFOPLIST_KEY_NSCameraUsageDescription = "This app requires camera access to take photos for uploading images directly from the camera."; + INFOPLIST_KEY_NSMicrophoneUsageDescription = "This app requires microphone access to record audio for video uploads directly from the camera."; INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents = YES; INFOPLIST_KEY_UILaunchStoryboardName = LaunchScreen; INFOPLIST_KEY_UIMainStoryboardFile = Main; - INFOPLIST_KEY_UISupportedInterfaceOrientations = UIInterfaceOrientationPortrait; + INFOPLIST_KEY_UISupportedInterfaceOrientations_iPad = UIInterfaceOrientationPortrait; IPHONEOS_DEPLOYMENT_TARGET = 13.0; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", "@executable_path/Frameworks", ); MARKETING_VERSION = 0.0.1; - PRODUCT_BUNDLE_IDENTIFIER = com.SwiftExample; + PRODUCT_BUNDLE_IDENTIFIER = HC9N5Z797X.com.deskpro.mobile.ios; PRODUCT_NAME = "$(TARGET_NAME)"; + PROVISIONING_PROFILE_SPECIFIER = ""; SUPPORTED_PLATFORMS = "iphoneos iphonesimulator"; SUPPORTS_MACCATALYST = NO; SUPPORTS_MAC_DESIGNED_FOR_IPHONE_IPAD = NO; SUPPORTS_XR_DESIGNED_FOR_IPHONE_IPAD = NO; SWIFT_EMIT_LOC_STRINGS = YES; SWIFT_VERSION = 5.0; - TARGETED_DEVICE_FAMILY = "1,2"; + TARGETED_DEVICE_FAMILY = 1; }; name = Release; }; @@ -398,22 +421,40 @@ /* End XCConfigurationList section */ /* Begin XCRemoteSwiftPackageReference section */ - 5E19A4E72B71A0950056D784 /* XCRemoteSwiftPackageReference "messenger-sdk-ios" */ = { + 5E66BF0A2B7FB63100FAF349 /* XCRemoteSwiftPackageReference "messenger-sdk-ios" */ = { isa = XCRemoteSwiftPackageReference; repositoryURL = "https://github.com/deskpro/messenger-sdk-ios.git"; + requirement = { + kind = exactVersion; + version = 0.0.10; + }; + }; + 5EF899162B728D75005547BC /* XCRemoteSwiftPackageReference "firebase-ios-sdk" */ = { + isa = XCRemoteSwiftPackageReference; + repositoryURL = "https://github.com/firebase/firebase-ios-sdk.git"; requirement = { kind = upToNextMajorVersion; - minimumVersion = 0.0.7; + minimumVersion = 10.20.0; }; }; /* End XCRemoteSwiftPackageReference section */ /* Begin XCSwiftPackageProductDependency section */ - 5E19A4E82B71A0950056D784 /* messenger-sdk-ios */ = { + 5E66BF0B2B7FB63100FAF349 /* messenger-sdk-ios */ = { isa = XCSwiftPackageProductDependency; - package = 5E19A4E72B71A0950056D784 /* XCRemoteSwiftPackageReference "messenger-sdk-ios" */; + package = 5E66BF0A2B7FB63100FAF349 /* XCRemoteSwiftPackageReference "messenger-sdk-ios" */; productName = "messenger-sdk-ios"; }; + 5EF899172B728D75005547BC /* FirebaseAnalytics */ = { + isa = XCSwiftPackageProductDependency; + package = 5EF899162B728D75005547BC /* XCRemoteSwiftPackageReference "firebase-ios-sdk" */; + productName = FirebaseAnalytics; + }; + 5EF899412B728D75005547BC /* FirebaseMessaging */ = { + isa = XCSwiftPackageProductDependency; + package = 5EF899162B728D75005547BC /* XCRemoteSwiftPackageReference "firebase-ios-sdk" */; + productName = FirebaseMessaging; + }; /* End XCSwiftPackageProductDependency section */ }; rootObject = 5E19F5882B477AE400E37F55 /* Project object */; diff --git a/Examples/SwiftExample/SwiftExample.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved b/Examples/SwiftExample/SwiftExample.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved index 6e18c34..f944a0c 100644 --- a/Examples/SwiftExample/SwiftExample.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved +++ b/Examples/SwiftExample/SwiftExample.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved @@ -1,12 +1,129 @@ { "pins" : [ + { + "identity" : "abseil-cpp-binary", + "kind" : "remoteSourceControl", + "location" : "https://github.com/google/abseil-cpp-binary.git", + "state" : { + "revision" : "bfc0b6f81adc06ce5121eb23f628473638d67c5c", + "version" : "1.2022062300.0" + } + }, + { + "identity" : "app-check", + "kind" : "remoteSourceControl", + "location" : "https://github.com/google/app-check.git", + "state" : { + "revision" : "3e464dad87dad2d29bb29a97836789bf0f8f67d2", + "version" : "10.18.1" + } + }, + { + "identity" : "firebase-ios-sdk", + "kind" : "remoteSourceControl", + "location" : "https://github.com/firebase/firebase-ios-sdk.git", + "state" : { + "revision" : "b880ec8ec927a838c51c12862c6222c30d7097d7", + "version" : "10.20.0" + } + }, + { + "identity" : "googleappmeasurement", + "kind" : "remoteSourceControl", + "location" : "https://github.com/google/GoogleAppMeasurement.git", + "state" : { + "revision" : "ceec9f28dea12b7cf3dabf18b5ed7621c88fd4aa", + "version" : "10.20.0" + } + }, + { + "identity" : "googledatatransport", + "kind" : "remoteSourceControl", + "location" : "https://github.com/google/GoogleDataTransport.git", + "state" : { + "revision" : "a732a4b47f59e4f725a2ea10f0c77e93a7131117", + "version" : "9.3.0" + } + }, + { + "identity" : "googleutilities", + "kind" : "remoteSourceControl", + "location" : "https://github.com/google/GoogleUtilities.git", + "state" : { + "revision" : "bc27fad73504f3d4af235de451f02ee22586ebd3", + "version" : "7.12.1" + } + }, + { + "identity" : "grpc-binary", + "kind" : "remoteSourceControl", + "location" : "https://github.com/google/grpc-binary.git", + "state" : { + "revision" : "a673bc2937fbe886dd1f99c401b01b6d977a9c98", + "version" : "1.49.1" + } + }, + { + "identity" : "gtm-session-fetcher", + "kind" : "remoteSourceControl", + "location" : "https://github.com/google/gtm-session-fetcher.git", + "state" : { + "revision" : "76135c9f4e1ac85459d5fec61b6f76ac47ab3a4c", + "version" : "3.3.1" + } + }, + { + "identity" : "interop-ios-for-google-sdks", + "kind" : "remoteSourceControl", + "location" : "https://github.com/google/interop-ios-for-google-sdks.git", + "state" : { + "revision" : "2d12673670417654f08f5f90fdd62926dc3a2648", + "version" : "100.0.0" + } + }, + { + "identity" : "leveldb", + "kind" : "remoteSourceControl", + "location" : "https://github.com/firebase/leveldb.git", + "state" : { + "revision" : "9d108e9112aa1d65ce508facf804674546116d9c", + "version" : "1.22.3" + } + }, { "identity" : "messenger-sdk-ios", "kind" : "remoteSourceControl", "location" : "https://github.com/deskpro/messenger-sdk-ios.git", "state" : { - "revision" : "0638f13a32f5781145a3a18dc553e9f181aafe85", - "version" : "0.0.7" + "revision" : "fba94d11fd01b7dac36627f0777cf5f8a0b2a1e8", + "version" : "0.0.10" + } + }, + { + "identity" : "nanopb", + "kind" : "remoteSourceControl", + "location" : "https://github.com/firebase/nanopb.git", + "state" : { + "revision" : "819d0a2173aff699fb8c364b6fb906f7cdb1a692", + "version" : "2.30909.0" + } + }, + { + "identity" : "promises", + "kind" : "remoteSourceControl", + "location" : "https://github.com/google/promises.git", + "state" : { + "revision" : "e70e889c0196c76d22759eb50d6a0270ca9f1d9e", + "version" : "2.3.1" + } + }, + { + "identity" : "swift-protobuf", + "kind" : "remoteSourceControl", + "location" : "https://github.com/apple/swift-protobuf.git", + "state" : { + "revision" : "65e8f29b2d63c4e38e736b25c27b83e012159be8", + "version" : "1.25.2" } } ], diff --git a/Examples/SwiftExample/SwiftExample/AppDelegate.swift b/Examples/SwiftExample/SwiftExample/AppDelegate.swift index 0c70830..5bd244a 100644 --- a/Examples/SwiftExample/SwiftExample/AppDelegate.swift +++ b/Examples/SwiftExample/SwiftExample/AppDelegate.swift @@ -7,29 +7,106 @@ import UIKit import UserNotifications +import FirebaseCore +import FirebaseMessaging +import messenger_sdk_ios -@main -class AppDelegate: UIResponder, UIApplicationDelegate { - +protocol PushNotificationDelegate: AnyObject, MessagingDelegate { + + func didRegisterForRemoteNotifications(withDeviceToken token: String, type: TokenType) +} +enum TokenType: String { + case apnsToken, fcmToken +} +@main +class AppDelegate: UIResponder, UIApplicationDelegate, MessagingDelegate { + + weak var pushNotificationDelegate: PushNotificationDelegate? + + var messenger: DeskPro? + func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool { - // Override point for customization after application launch. + + FirebaseConfiguration.shared.setLoggerLevel(.debug) + FirebaseApp.configure() + + UNUserNotificationCenter.current().delegate = self + + Messaging.messaging().delegate = self + return true } - + func application(_ application: UIApplication, didRegisterForRemoteNotificationsWithDeviceToken deviceToken: Data) { - let hexString = deviceToken.map { String(format: "%02.2hhx", $0) }.joined() - print("Device token \(hexString)") + let token = deviceToken.map { String(format: "%02.2hhx", $0) }.joined() + //print("token: \(token)") + //pushNotificationDelegate?.didRegisterForRemoteNotifications(withDeviceToken: token, type: .apnsToken) } - + + func messaging(_ messaging: Messaging, didReceiveRegistrationToken fcmToken: String?) { + if let fcm = Messaging.messaging().fcmToken { + print("fcmToken: \(fcm)") + pushNotificationDelegate?.didRegisterForRemoteNotifications(withDeviceToken: fcm, type: .fcmToken) + } + } + func application(_ application: UIApplication, configurationForConnecting connectingSceneSession: UISceneSession, options: UIScene.ConnectionOptions) -> UISceneConfiguration { // Called when a new scene session is being created. // Use this method to select a configuration to create the new scene with. return UISceneConfiguration(name: "Default Configuration", sessionRole: connectingSceneSession.role) } +} +extension AppDelegate: UNUserNotificationCenterDelegate { + + //triggered when the app is in the foreground + func userNotificationCenter(_ center: UNUserNotificationCenter, + willPresent notification: UNNotification) async + -> UNNotificationPresentationOptions { + let userInfo = notification.request.content.userInfo + + print(isValidNotification(userInfo: userInfo)) + return [[.alert, .sound]] + } + //triggered when notification is tapped + func userNotificationCenter(_ center: UNUserNotificationCenter, + didReceive response: UNNotificationResponse) async { + let userInfo = response.notification.request.content.userInfo + + print(isValidNotification(userInfo: userInfo)) + } + + //triggered sometimes, when app is in the background + func application(_ application: UIApplication, didReceiveRemoteNotification userInfo: [AnyHashable: Any], fetchCompletionHandler completionHandler: @escaping (UIBackgroundFetchResult) -> Void) { + + if isValidNotification(userInfo: userInfo) { + + let center = UNUserNotificationCenter.current() + var identifiers: [String] = [] + center.getDeliveredNotifications(completionHandler: { notifications in + + for notification in notifications { + identifiers.append(notification.request.identifier) + } + + print("identifiers: \(identifiers.count)") + if identifiers.count > 1 { + print(identifiers) + identifiers.removeFirst() + print(identifiers) + center.removeDeliveredNotifications(withIdentifiers: identifiers) + } + + completionHandler(.newData) + }) + } + } + + func isValidNotification(userInfo: [AnyHashable: Any]) -> Bool { + return DeskPro.isDeskProPushNotification(data: userInfo) + } } - diff --git a/Examples/SwiftExample/SwiftExample/Assets.xcassets/AppIcon.appiconset/Contents.json b/Examples/SwiftExample/SwiftExample/Assets.xcassets/AppIcon.appiconset/Contents.json index 13613e3..4ab31e9 100644 --- a/Examples/SwiftExample/SwiftExample/Assets.xcassets/AppIcon.appiconset/Contents.json +++ b/Examples/SwiftExample/SwiftExample/Assets.xcassets/AppIcon.appiconset/Contents.json @@ -1,6 +1,7 @@ { "images" : [ { + "filename" : "elephant-2.jpg", "idiom" : "universal", "platform" : "ios", "size" : "1024x1024" diff --git a/Examples/SwiftExample/SwiftExample/Assets.xcassets/AppIcon.appiconset/elephant-2.jpg b/Examples/SwiftExample/SwiftExample/Assets.xcassets/AppIcon.appiconset/elephant-2.jpg new file mode 100644 index 0000000..4af123a Binary files /dev/null and b/Examples/SwiftExample/SwiftExample/Assets.xcassets/AppIcon.appiconset/elephant-2.jpg differ diff --git a/Examples/SwiftExample/SwiftExample/Assets.xcassets/elephant.imageset/Contents.json b/Examples/SwiftExample/SwiftExample/Assets.xcassets/elephant.imageset/Contents.json new file mode 100644 index 0000000..fc9c047 --- /dev/null +++ b/Examples/SwiftExample/SwiftExample/Assets.xcassets/elephant.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "filename" : "elephant.svg", + "idiom" : "universal", + "scale" : "1x" + }, + { + "idiom" : "universal", + "scale" : "2x" + }, + { + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Examples/SwiftExample/SwiftExample/Assets.xcassets/elephant.imageset/elephant.svg b/Examples/SwiftExample/SwiftExample/Assets.xcassets/elephant.imageset/elephant.svg new file mode 100644 index 0000000..a1e2b0d --- /dev/null +++ b/Examples/SwiftExample/SwiftExample/Assets.xcassets/elephant.imageset/elephant.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/Examples/SwiftExample/SwiftExample/Base.lproj/LaunchScreen.storyboard b/Examples/SwiftExample/SwiftExample/Base.lproj/LaunchScreen.storyboard index 865e932..0f16c38 100644 --- a/Examples/SwiftExample/SwiftExample/Base.lproj/LaunchScreen.storyboard +++ b/Examples/SwiftExample/SwiftExample/Base.lproj/LaunchScreen.storyboard @@ -1,8 +1,11 @@ - - + + + - + + + @@ -11,10 +14,21 @@ - + - + + + + + + + + + + + + @@ -22,4 +36,10 @@ + + + + + + diff --git a/Examples/SwiftExample/SwiftExample/Base.lproj/Main.storyboard b/Examples/SwiftExample/SwiftExample/Base.lproj/Main.storyboard index f874cee..2a33120 100644 --- a/Examples/SwiftExample/SwiftExample/Base.lproj/Main.storyboard +++ b/Examples/SwiftExample/SwiftExample/Base.lproj/Main.storyboard @@ -136,10 +136,10 @@ - + - +