Xcode is treating my iOS app as a Mac app - ios

I have been working on an app for a while. I recently saved it to a flash drive and worked on it using another computer. When I returned to using my original computer, the options to run in the simulators have changed to "my Mac." How can I change this back so I can test my app in the iPhone simulators? Thanks in advance.

Go to Manage schemes (by clicking to your app name):
Delete all the schemes, then click Autocreate schemes now button, and tell if it works.

Related

Firebase - iOS App Installation on iPhone X is not working

I uploaded an iOS enterprise build using App-Distribution feature of Firebase Console and shared with my testers.
We are able to download it on all devices except on iPhone X. The error shows "os version not supported". On click of this error, it displays details that "The developer needs to upload a build that supports iOS 10.15". Please check screenshots for reference.
Please note that iPhone X have iOS 13.3. I suspect not be an iOS version issue, because I downloaded app on my personal iPhone XR which has iOS 13.3.
Safari Browser Desktop mode was the culprit. If turned on, any distribution provider's script will think the link was opened it mac instead of iOS.
No need to reset the phone in my case!!!
Edit:
Actually Ram's answer works
Go into settings
Safari
Request Desktop Website
Turn off the switch
Old:
For me erasing all content and settings worked.
Steps:
open Settings
go to General
Reset (at the bottom)
Erase All Content and Settings
Remember to do some backup of your data because it will erase all the content.
I didn't check if Reset All Settings option works.
I hope it will help you!

Universal Links work in simulator but not on real devices

I added the apple-app-site-association: <domain>/.well-known/apple-app-site-association
I started with the "applinks" and when that didn't work I also added webcredentials and activitycontinuation.
I enabled Associated Domains for this app id and in the project I added applinks:<domain>, applinks:m.<domain> & applinks:*.<domain> in the associated domains which now appear in the entitlements file.
I checked the domain in the apple validation tool https://search.developer.apple.com/appsearch-validation-tool/ and that worked.
I tested it on multiple simulators and in each of them I could go to the website in safari and it showed me the banner above, I also sent a fake message in the Messages and that showed the details and opened the app.
I also tried changing Deployment Target to iOS 10.
But when I try to install it on the device from xCode, either in debug or release configuration or even upload the build to test flight, this doesn't work (Tried on iPhone 5s, iPhone 8 & iPhone XR).
I searched the internet and saw many people saying that universal links did not work for them until they did this and that and I tried every thing they said but I still can't make it work on real devices.
Is there something else I should do to make this work or did I get something wrong?
You have to wait a bit ( from minutes to hours ) after your app is successfully installed and launched to let iOS fetch the associated domain.
You can use a proxy like Charles to check if iOS has make the call.
Got the same issue and fixed by replacing App ID prefix instead of team ID in apple-app-site-association file

Dynamic link does not open the app, and "open in app" option not available in context menu

I just encountered a very weird behaviour with Firebase dynamic links.
It works perfectly on all of our test devices except for one.
This specific device is an iPhone-x, and the account was restored via iTunes (Not sure if this info is relevant, but i'm trying to give a full picture).
Our app is installed on this device from the app store (also tried deleting and reinstalling), but when trying to open a dynamic link it opens Safari instead, there we have the "open" button that opens the app store page of this app.
When trying to long tap on the link as suggested by developers that experienced the same issue, we have only one button that says "Open" which opens Safari again. I would expect that when the app is installed we would have two options:
1. "Open in Safari"
2. "Open in [App]"
Has anyone experienced this issue before? Anyone has any idea how to solve this?
The overall diagnoses here is that Universal Linking is not configured properly on the device. If Universal Links works on all other devices, then it is probably the case that the AASA file is not being downloaded properly. iOS 11.2 has had issues with this recently.
Check device logs
I suggest that you check the device logs when installing the application to see if the AASA file is being downloaded properly.
1) Delete your app and plug in the device to your computer
2) Open up Xcode and navigate to Window > Devices & Simulators
3) Select the device in the left-hand menu
4) In the bottom of the window you should see a triangle in a box. Clicking this will bring up the device logs.
5) Use a cmd-f to search for applinks and if your app downloaded the AASA correctly. You should see something like
Added service 'applinks', appID 'RXXXXXXXP.io.branch.Branchsters', domain 'branchster.app.link'
If this is not the case, then it looks like you AASA file is not being downloaded and you may need to delete the app, restart your phone, and try again.

Access to document folder of each app

in the past, i used to connect my iPhone or my iPad on my iMac.
In Xcode Organiser tool i was able to see all installed application and i was able to download document files for each app.
Since Xcode 6, i am not able to do this. I think i have to work with "Device" menu instead of "Organiser" menu. I can see my iPhone or my iPad but i cannot see apps.
I do not see "Use for Developpement" button.
Can anyone explain me how i should do in order to download all application document folders ?
Thanks
You will need to add your devices to the developer portal (https://developer.apple.com/account/ios/device/deviceList.action) and update your provisioning profiles accordingly (which is what the "Use for development" button actually did).
After that things are quite straightforward. By going into the devices window in Xcode and selecting your device, you will get the list of your installed apps. Tapping on the cog icon will give you the options to see and download the app's container (as shown in the screenshot)

Test a PhoneGap application on a real device

I built an application using Phonegap and I tested it on the iPhone Simulator.
Now I want to "send" it to the iPad, can somebody explain me how to handle that ?
Of course I've got an apple id and all others stuff...
I made the "provisioning profile" for the iPad, but I don't understood how I can run it on the device. If somebody can explain me or redirect me to a good tutorial for this kind of "testing development". Thanks in advance.
If you have an Apple ID and the ipad is properly provisioned, then you simply need to change where you are building to in xcode. Click on the button next to the "run" and "stop" buttons in xcode. The button will be the name of your project followed by "nameOfProject>iPad 4.3 Simulator" or something similar. Change this to be "iOS device name of ipad", the ipad you have plugged into the computer. Now rebuild and run.
A way to distribute application without asking user to copy provisioning profile and application file to iTunes and then sync iPhone with it. Now, only thing that they need to do is to click on the link in e-mail, which will open website on device and there they can click to install application and profile on the iPhone.
http://blog.amarkulo.com/ad-hoc-profiles-and-application-distribution-via-web
Other reference :
http://support.twixlmedia.com/kb/epublisher-builder-application/how-do-i-create-the-distribution-provisioning-profile-for-my-ad-hoc-build
use "run" instead of "emulate".
I've only used cordova but cordova run <osname> will install it on your device if it's plugged in.
ie:
cordova run ios (I refuse to pay 99$ so not tested but it should)
cordova run android (works beautifully)
Okay this is a bit of a shortcut/cheat. But what i've done was do phonegap serve and then open the IP address that it provides you on my Iphone...It's pretty much the same as having it run on your device as an APK!
Step One:
cd to your directory and run phonegap serve
Step two:
On your Iphone/Android/Device open your web-browser (e.g safari) and type in the IP phonegap has given you.
Step three:
Have fun seeing your app work :)
However if you're using some of phonegaps features (gps, etc...) then these won't work. This solution is a quick and easy way of viewing your app that doesn't use any hardware controls (e.g a jquery mobile app)

Resources