Sharing data among IOS App in MAC, iPhone, iPad and iWatch? Same App installed by individual user on multiple devices - ios

Here things getting more passionate and difficult for me as a developer. I want to set up an app that would be capable to remind user for certain tasks at some specific time. The app would use LocalNotifications to remind the user.
Now, user may have this same app installed on his multiple devices, like iPhone, iPad, iWatch and MacOS. User would also change the time of those tasks and other parameters from any of the device he/she want to, I mean iPhone, iPad, iWatch or MacOS.
The operation on data amendments would then sync with all devices.
For instance, if user is having app installed on iPhone and he is set up with a tsk; i-e:
Task
{
taskId
taskName
taskTimeData
}
A task is initialised with name 'exampleTask' in iPhone and notification and every other option is also set in iPhone. After installing same app on iPad and setting the iWatch entitlement of the app.
Now the user must also receive similar functionality on both iPad and iWatch. Similarly, changing the name/timeDate of certain specific task must also update the task in other devices also.
Also must update the time for functionality execution in all the devices.
Please list all the available options in this regard, may become useful for other readers in future.
NOTE: I've gathered some of the related xCode entitlements but can't make myself understand.
1. App Groups
2. Keychain Sharing
3. Cloud Kit
Please explain options from xCode entitlements, I'm neither interested in any third party frameworks nor in web services and third party servers.

Related

New requirements for iOS app - keep them accessible to users/customers

I got an email from Apple that apps now require iOS13 + storyboard for app launch screen for existing apps. (I do not use storyboard for main app functionality)
I have developed a couple swift1/swift2 based for schools a long time ago. (Still works well)
Can I somehow ditch the app store and then provide direct access or download for school pupils?
i.e. is there any way forward to simple keep the apps-as-they-are? Maybe limited download availability?
Or will I have to take plunge back into app-building?
The requirement of a Storyboard launch screen is only when you need to submit an app update. If you are not wanting to update your app any more, then it won’t stop working because of this new requirement.
Regarding distribution outside of the App Store, you could use Adhoc distribution which requires you to know the device ID’s of the devices you want to install it to.

How can i export app file in Xcode

Do you know how to export app file in Xcode?
(like .apk file in android)
I want to send my testing app to someone for feedback.
i have never tried it before. please let me know easy way to export app file.
(not all project, only a file which can be played in another iPhone)
First Archive it (XCode->Product->Archive).
(For Archive button to be in visible state : either your device should be selected or generic ios device should be selected, incase any simulator is selected archive button will be disabled.)
A Window will appear :
Choose Export->AdHoc.
.ipa will be generated.
u can use https://www.diawi.com/ for uploading and send app to anyone.
I am posting a very late response to this old question in case anyone else finds their way here and infers that it isn't possible to export an app to your own iPhone or iPad without a developer account. That isn't true. I unearthed these posts when looking for an answer to the same question, and initially read them that way.
If you want to test an app you have written in XCode on your own iOS device you do not need a developer account. Provided the device you wish to test it on (or share it with) is physically nearby so that you can connect it to your macOS device to pair with it as a trusted device, it will remain paired when physically disconnected and accessible over a shared network by WiFi. You can build and run apps from XCode on to the iOS destination device and they will remain in place there and executable afterwards. There is a limit to how many exported apps there can be at one time, which seems to be 3.
Apple explain how to do all this here. You do need to have a registered App Store account, but that's the same one you use to buy apps and build projects in XCode, and it's free unless you want to distribute your app through the App Store.

iOS Watchkit: Is it possible to show static UI in Watch when app is not reachable?

Can we show some static UI in the watch when iPhone is not reachable to AppleWatch?
Suppose I forgot my iPhone at car seat , and when I move from car, Is it possible to shows some static UI in AppleWatch that you forgot your iPhone?
From an Apple evangelist on https://devforums.apple.com/thread/254576?tstart=0
The end result is that if iPhone is unreachable, the app will not
function. There is not a way to currently cache information to keep it
alive or seemingly so.
Actually you don't have to do anything. I noticed on the real Watch, that Apple will present a default "iPhone unavailable" screen in case the iPhone is out of reach. Similarly, Apple will also present a default "flight mode" screen when the Watch is in flight mode :) . See attached screenshots.
In WatchOS 2, it is now possible to have a WatchKit App that runs on the Watch when the iPhone is not accessible.
Previous answer:
It is clear from Apple's public statements and the WatchKit API that third party developers do not need to manage the connectivity between the watch and the phone, and indeed cannot even if they want to.
Given Apple have publicly indicated that Watch app interactions are expected to be measured in seconds, not minutes, and that developers need to assume that their Watch app could be quit at any time (and the associated WatchKit extension) it seems highly likely that there will not be any option to present static content in the event of the phone being unreachable—as the Watch OS will immediately take over the process of interacting with the user.
It seems almost certain that this will change later in 2015, given developers have been told there will be an SDK to develop 'fully native' apps at that time.
Technically speaking you could start off the app storyboard scene with static content. if the phone is unreachable, then this scene will be displayed. But as soon as your app, whether programmatically or by user interaction attempts to use anything from the WatchKit Extension, a spinner will appear.

iOS 8 Suggested Apps - How does it work?

Over the past little while I’ve been working with a client who would like to leverage Apple’s new Suggested App feature on iOS 8. The client's goal was to display a suggest app lock screen notification any time a person passes by a specific geo-location. After spending some time trying to find a concrete answer to what level of control (if any) the client would have over Apple’s Suggest App feature, it was decided to send our questions directly to Apple.
Below is copy of the questions I sent to Apple.
Hello,
For our next app release, my team and I would like to leverage Apple's Suggest App feature provided in iOS 8.
We've taken a look through the iTunes Connect portal and we haven't been able to find a configuration panel anywhere which allows us to control when/where our app should appear as a suggested app.
Questions:
Is it possible for us to specify the conditions that out app will appear as a suggested app for users who haven't downloaded it yet?
Can we specify a geo-fence that will display our app as a suggested app on a user's lock screen?
If we have no control over Apple's Suggested App configuration, under what conditions will our iOS appear on a user's lock screen as a suggested app?
STEPS TO REPRODUCE
Turn on your phone
Enable suggested apps
Enable 3G
Lock your screen
Walk past a region.
Expected Result: A suggested app appears on the iPhone lock screen.
Here is the response I received directly from Apple Developer Support Team:
Hello,
Location relevant Apps are recommended on the lock screen and in the App Store based on a number of factors, including their popularity at the location, and there is no mechanism or process by which an App developer can add their App to the list of recommended Apps.
However, if your iOS App is directly related to the location or venue (such as a mall guide iOS App which is published by the mall owner or operator), and you believe your iOS App’s relevance warrants it being included the list of recommended Apps, then you are encouraged to submit an enhancement request via http://bugreport.apple.com/, and request that Apple consider whether your iOS App should be included in the list of recommended Apps for that location.
You should provide as much detail in the ’enhancement request' about the App and venue/location as possible, such as the App ID, App Name, URL to the App on the App Store, venue name, venue location (address & lat/lon), the relevance (if any) of your iOS App to the venue/location, and relationship (if any) between you as the developer and the owner/operator of the venue/location.
Submission of an enhancement request does not guarantee that a particular iOS App will be added to the list of recommended Apps for a venue or location, and the sole feedback from Apple on the request will come through the http://bugreport.apple.com/ bug report system.
Regards,
Apple Developer Technical Support

Lock iOS app in single app mode programmatically

Note : I don't want to submit this app to app store.
What i want to achieve :
I want simple app with one view having two button Lock and Unlock.
Lock - This button will lock device. Only this app's screen will show nothing else will be accessible even after restart same screen will show up. Home button, gestures will get disabled similar to single app mode.
Unlock - This will unlock device and switch to normal behaviour of device.
iOS :
I want this for iOS 4.3 and above.
I have checked following solutions, but these don't match my requirements
Configuration profile
Lock-down iPhone/iPod/iPad so it can only run one app
But it is manual (reboot device, open app which you want to run in single app mode). I want to do it programmatically the way i mentioned above through my app.
Guided access (iOS 6 and above)
How to lock down user to Single App mode in iOS 6, Programmatically?
I want it do for all os and programatically.
Is there any way to do this ? As i don't wan't to submit it to app store is there any private api, some hack for springboard to achieve this ?
Thanks in advance !!
As I know in iOS 7 there is a new feature which allow to do exactly what you want.
However, it's only applicable for iOS 7 (and I believe it's only applicable to a supervised devices).
1) You will need to install restriction configuration profile with autonomousSingleAppModePermittedAppIDs key (take a look here)
This is one time step and a user will need to manually accept this configuration profile.
There is another option to use MDM to install it silently, but it could be an overkill for you.
2) You should use API:
UIAccessibilityRequestGuidedAccessSession (to lock/unlock)
It is defined here
3) And most beautility part. All of it is officially document. So, you can even submit it to AppStore.
P.S. Why do you care about 4.3 or 5? They have tiny market share by now. Most likely even iOS 6 has below 20% market share already.
Update 1
Potentially, you can try to use API which sends clicks and keys (search for GSEvent in iPhone-privateapi tag). May be using these API's you can do triple home to toggle accessibility on and off.
If this work, I think you should be able to cover iOS 6. I am not sure whether both this API and triple home click were available prior that.
It looks like this private API is unaccessible anymore in iOS 7. So, probably you can ignore this idea.
Just wanted to write on this even though this is old as i needed to implement a similar solution and i got it working. The steps for me as follows and a note here is that this involves MDM and other specific steps.
My requirement was as follows. Each of the iPad at different locations has a set of apps installed.For ease of it lets assume each Dept. has their own apps. Participants open a app related to their dept. to take a test, the APP automatically Locks the iPad to single-app Mode and at the end of the test, it will unlock it self.
Supervise the iPad/iphone using the Apple Configurator.
Install the MDM related files ( Each MDM has its own set of instructions, usually involves downloading a profile).
Every MDM has a option of Single APP Mode or MultipleAppMode. Select the second option and add the app IDs to the list. (A single APP mode works pretty well with MDM's but i did not want the app to be locked to a single APP all the time).
I used the UIAccessibilityRequestGuidedAccessSession api to lock unlock the device from single app mode.
http://bobxcode.blogspot.com/2015/12/programmatically-implement-single-app.html
Thanks,
Bob
In MDM configuration, There is an option
autonomousSingleAppModePermittedAppIDs
Optional. Supervised only. If present, allows apps
identified by the bundle IDs listed in the array to
autonomously enter Single App Mode.
Availability: Available only in iOS 7.0 and later.
But this needs Supervised Device mode.

Resources