I found little snippet from twitter about how to know if application is installed via TestFlight.
Here, appStoreReceiptURL is an instance property, which we can find from main bundle. Documentation
Here, I am adding snippet for both Objective-C and Swift.
Create notification content with threadIdentifier to create group of that notification. Group will be of the application or specific topic from an application.
Swift
1
2
3
4
5
// Creating Groups with Thread Identifiers
letcontent=UNMutableNotificationContent()
content.title="Notifications Group"
content.body="Tutorial by Ashish Kakkad"
content.threadIdentifier="notify-team-ios"
Notification payload will be like this
1
2
3
4
5
6
7
8
9
{
"aps":{
"alert":{
"title":"Notifications Group",
"body":"Tutorial by Ashish Kakkad"
}
"thread-id":"notify-team-ios"
}
}
Give meaningful name to thread identifier for specific purpose of group.
CocoaPods is a dependency manager for Swift and Objective-C Cocoa projects. CocoaPods Logo
CocoaPods is built with Ruby and is installable with the default Ruby available on OS X. We recommend you use the default ruby.
Update your system
Update your system by following command in terminal.
1
$sudo gem update--system
Above command will install/update rubygems.
Install CocoaPods
Install CocoaPods in your system by following command in terminal.
1
$sudo gem install cocoapods
If you are getting errors above command then use following command.
1
$sudo gem install-n/usr/local/bin cocoapods
Check CocoaPods Version
1
$pod--version
Update CocoaPods Repository
We have to update CocoaPods repository with latest pod updates by developers. Use following command to update CocoaPods repository:
1
$pod repo update
It will take some time to update all sub repositories.
Update pod for your project
If you directly apply the command pod install then some time new pods will not be updated in your project. For that you have to remove that specific pod information from the pod file and you have to apply pod install command. It will remove pod from the project. After that again you have to add the pod information in the pod file. Again you have to apply pod install command to install new version of pod. Follow the next steps:
1. Remove SomePod from the Podfile
2. Run pod install pods will now remove SomePod from our project and from the Podfile.lock file.
3. Put back SomePod into the Podfile
4. Run pod install again This time the latest version of our pod will be installed and saved in the Podfile.lock. You can update single pod file as follows:
1
$pod update'POD_NAME'
Remove all CocoaPods from a project
Install CocoaPods deintegrate and clean commands from terminal.
Xcode is IDE for development of the iOS, macOS, tvOS and watchOS applications. Every year apple comes up with so many changes in this IDE. Xcode 9.3 released on March 29, 2018.
Here, I am listing out all the issues with the workaround.
Codable is added with Xcode 9, iOS 11 and Swift 4. Codable is used to make your data types encodable and decodable for compatibility with external representations such as JSON.
Codable use to support both encoding and decoding, declare conformance to Codable, which combines the Encodable and Decodable protocols. This process is known as making your types codable.
Let’s Take an Example with Structure of Movie, here we have defined the structure as Codable. So, We can encode and decode it easily.
Firebase Authentication gives us backend services to authenticate users with your app. It provides SDKs and ready-made UI libraries. It supports authentication using passwords, and other providers like Google, Facebook and Twitter, Github, and more.
The new framework called “UserNotifications” is introduced with iOS 10 SDK. The UserNotifications framework (UserNotifications.framework) supports the delivery and handling of local and remote notifications.
So, Let see what we have to change to get the push notifications in iOS 10.
The new framework called “UserNotifications” is introduced with iOS 10 SDK. The UserNotifications framework (UserNotifications.framework) supports the delivery and handling of local and remote notifications. So, Let see what we have to change to get the push notifications in iOS 10.
Steps for implement code to handle push notifications in iOS 10
Import UserNotifications.framework in your AppDelegate file
#import
Also add UNUserNotificationCenterDelegate.
#import
@interface AppDelegate : UIResponder
@end
Register for push notification
Before registration check the version of iOS and then based on versions do the code. For iOS 7 code was different, fro iOS 8 & 9 code was different and again for iOS 10 code is different.
As per my opinion you have to set the deployment target to iOS 8 or iOS 9 and later. For this you can check the adoption ratio of iOS in the devices.
You will be surprise that notification displayed when application in foreground too in iOS 10. As we know that in old versions we display alert or something else which will be look like notification comes in foreground.
There are two delegate methods need to be handled :
//Called when a notification is delivered to a foreground app.
-(void)userNotificationCenter:(UNUserNotificationCenter *)center willPresentNotification:(UNNotification *)notification withCompletionHandler:(void (^)(UNNotificationPresentationOptions options))completionHandler{
NSLog(@"User Info : %@",notification.request.content.userInfo);
completionHandler(UNAuthorizationOptionSound | UNAuthorizationOptionAlert | UNAuthorizationOptionBadge);
}
//Called to let your app know which action was selected by the user for a given notification.
-(void)userNotificationCenter:(UNUserNotificationCenter *)center didReceiveNotificationResponse:(UNNotificationResponse *)response withCompletionHandler:(void(^)())completionHandler{
NSLog(@"User Info : %@",response.notification.request.content.userInfo);
completionHandler();
}
Add Push Notifications Entitlements
Go to your project target’s Capabilities tab and add Push Notifications Entitlements.
If it’s available in your certificates then it will enable directly else configure your profile with the certificates and you can enable this capability by that.
Now it’s easier than ever to deliver your screenshots and app preview using iTunes Connect. Submit just one set of screenshots and one optional app preview per device family, and they will be used across device sizes and localizations.
If your app’s UI or behavior changes based on device size, or if you would like to include localized screenshots, you can use the new Media Manager to add custom screenshots. Learn more by watching What’s New in iTunes Connect from WWDC16.