# Appium test on ios opens and close the application over and over again

**URL:** <https://discuss.appium.io/t/appium-test-on-ios-opens-and-close-the-application-over-and-over-again/8390>\
**Category:** Issues/Bugs\
**Created:** [February 8, 2016, 10:51am UTC](https://discuss.appium.io/t/appium-test-on-ios-opens-and-close-the-application-over-and-over-again/8390 "2016-02-08T10:51:46Z")\
**Posts on this page:** 12\
**Page:** 1

<div class="post-metadata">

**Author:** ![adibiton](https://discuss.appium.io/letter_avatar_proxy/v4/letter/a/ba8739/32.png) [@adibiton](https://discuss.appium.io/u/adibiton)\
**Post date:** [February 8, 2016, 10:51am UTC](https://discuss.appium.io/t/appium-test-on-ios-opens-and-close-the-application-over-and-over-again/8390/1 "2016-02-08T10:51:46Z")

</div>

Hi,  
I’ve downloaded linkedIn.ipa application and located it in Applacations/Appium.app/Contents/Resources/node\_modules/appium/ on my mac machine.  
I’ve run a tiny code that connects to the appium with an app capability of that linkedIn.ipa. however, in run time the simulator is shown up, and the application (linkedIn) opened and closed over and over again until the program crashes. the error output on the appium server is  
info: [debug] [INST STDERR] 2016-02-08 02:50:07.485 instruments[1437:29882] Attempting to change event horizon while disengage  
info: [debug] [INST STDERR] Instruments Trace Error : Target failed to run: The operation couldn’t be completed. (FBSOpenApplicationErrorDomain error 1.) : Failed to launch process with bundle identifier ‘com.linkedin.LinkedIn’  
Am I missing something? Do I have to download the application into the simulator before?

---

<div class="post-metadata">

**Author:** ![salmanchauhan](https://discuss.appium.io/user_avatar/discuss.appium.io/salmanchauhan/32/11566_2.png) [@salmanchauhan](https://discuss.appium.io/u/salmanchauhan)\
**Post date:** [February 8, 2016, 11:36am UTC](https://discuss.appium.io/t/appium-test-on-ios-opens-and-close-the-application-over-and-over-again/8390/2 "2016-02-08T11:36:39Z")

</div>

@adibiton  
In iOS You need to have the app with debug permissions. Contact your development team to provide you build with debug permissions.

Regards,  
Salmankhan

---

<div class="post-metadata">

**Author:** ![adibiton](https://discuss.appium.io/letter_avatar_proxy/v4/letter/a/ba8739/32.png) [@adibiton](https://discuss.appium.io/u/adibiton)\
**Post date:** [February 8, 2016, 11:54am UTC](https://discuss.appium.io/t/appium-test-on-ios-opens-and-close-the-application-over-and-over-again/8390/3 "2016-02-08T11:54:32Z")

</div>

> [@salmanchauhan](#):
>
> Contact your development team to provide you build with debug permissions.

I downloaded the application from iTunes app store… how can I get the debug permissions from there?

---

<div class="post-metadata">

**Author:** ![salmanchauhan](https://discuss.appium.io/user_avatar/discuss.appium.io/salmanchauhan/32/11566_2.png) [@salmanchauhan](https://discuss.appium.io/u/salmanchauhan)\
**Post date:** [February 8, 2016, 12:07pm UTC](https://discuss.appium.io/t/appium-test-on-ios-opens-and-close-the-application-over-and-over-again/8390/4 "2016-02-08T12:07:24Z")

</div>

you can’t debug app downloaded from iTunes app store.

---

<div class="post-metadata">

**Author:** ![adibiton](https://discuss.appium.io/letter_avatar_proxy/v4/letter/a/ba8739/32.png) [@adibiton](https://discuss.appium.io/u/adibiton)\
**Post date:** [February 8, 2016, 12:38pm UTC](https://discuss.appium.io/t/appium-test-on-ios-opens-and-close-the-application-over-and-over-again/8390/5 "2016-02-08T12:38:46Z")

</div>

Ok…Then, Is there any way to test an application downloaded from app store, or it has to be developed by my development team?

---

<div class="post-metadata">

**Author:** ![Gery](https://discuss.appium.io/letter_avatar_proxy/v4/letter/g/c5a1d2/32.png) [@Gery](https://discuss.appium.io/u/Gery)\
**Post date:** [February 8, 2016, 1:07pm UTC](https://discuss.appium.io/t/appium-test-on-ios-opens-and-close-the-application-over-and-over-again/8390/6 "2016-02-08T13:07:16Z")

</div>

Hello @adibiton ,

I have also encountered this question before, and i also had this problem while trying to test our application by directly downloading IPA from jenkins, this does not work unless you have a build signed with debug permission.

Maybe this related thread can help : [The app must be signed with a development identity](https://discuss.appium.io/t/the-app-must-be-signed-with-a-development-identity/2653/6)

Regards,  
–Gery–

---

<div class="post-metadata">

**Author:** ![adibiton](https://discuss.appium.io/letter_avatar_proxy/v4/letter/a/ba8739/32.png) [@adibiton](https://discuss.appium.io/u/adibiton)\
**Post date:** [February 10, 2016, 6:20am UTC](https://discuss.appium.io/t/appium-test-on-ios-opens-and-close-the-application-over-and-over-again/8390/7 "2016-02-10T06:20:17Z")

</div>

thanks you all for replying…  
If I’m using real device(not simulator), can I test an application downloaded from itunes app store?

---

<div class="post-metadata">

**Author:** ![Gery](https://discuss.appium.io/letter_avatar_proxy/v4/letter/g/c5a1d2/32.png) [@Gery](https://discuss.appium.io/u/Gery)\
**Post date:** [February 10, 2016, 9:59am UTC](https://discuss.appium.io/t/appium-test-on-ios-opens-and-close-the-application-over-and-over-again/8390/8 "2016-02-10T09:59:10Z")

</div>

I`m 95% sure its a NO,  
It should give the same provision issue if it is not signed with debug permission by devs. I work only with real devices and i could not make it work on iOS without that permission.

AFAIK only android can be automated regardless of source (Amazon, GP, direct apk).

–Gery–

---

<div class="post-metadata">

**Author:** ![adibiton](https://discuss.appium.io/letter_avatar_proxy/v4/letter/a/ba8739/32.png) [@adibiton](https://discuss.appium.io/u/adibiton)\
**Post date:** [February 28, 2016, 7:07am UTC](https://discuss.appium.io/t/appium-test-on-ios-opens-and-close-the-application-over-and-over-again/8390/9 "2016-02-28T07:07:45Z")

</div>

Ok…thanks.  
however, can I test an application that is under release mode, or debug is necessary?

---

<div class="post-metadata">

**Author:** ![salmanchauhan](https://discuss.appium.io/user_avatar/discuss.appium.io/salmanchauhan/32/11566_2.png) [@salmanchauhan](https://discuss.appium.io/u/salmanchauhan)\
**Post date:** [March 2, 2016, 10:38am UTC](https://discuss.appium.io/t/appium-test-on-ios-opens-and-close-the-application-over-and-over-again/8390/10 "2016-03-02T10:38:23Z")

</div>

@adibiton  
you need app to be in debug mode only and in case you are not having any such app you can use apps from this url for learning purpose

> **[dkhamsing/open-source-ios-apps](https://github.com/dkhamsing/open-source-ios-apps)**
>
> :iphone: Collaborative List of Open-Source iOS Apps - dkhamsing/open-source-ios-apps

---

<div class="post-metadata">

**Author:** ![duncwa](https://discuss.appium.io/user_avatar/discuss.appium.io/duncwa/32/3321_2.png) [@duncwa](https://discuss.appium.io/u/duncwa)\
**Post date:** [March 31, 2017, 9:53pm UTC](https://discuss.appium.io/t/appium-test-on-ios-opens-and-close-the-application-over-and-over-again/8390/11 "2017-03-31T21:53:52Z")

</div>

AppName.app (for simulator) and AppName.ipa (for iphone/ipad physical device) are the two files needed and created using Xcode IDE. You need to build the app as DEBUG/RELEASE (in XCODE -\> Product -\> Scheme -\> Edit Scheme -\> Select RUN on the left panel -\> Select INFO on top menu bar -\> To the right of Build Configuration toggle between Release (creates an IPA\*) and (Debug creates an APP). COMMAND+B will build your project. After the build process completes navigate to DerivedData folder which can be found using this: (in XCODE -\> File -\> Workspace Settings -\> click on small arrow to the right of file URL. The file URL is just above the “Advanced…” button.

See XCODE (Window -\> Organizer -\> Archives -\> Export -\> Adhoc to create the IPA file).

---

<div class="post-metadata">

**Author:** ![pabloRam](https://discuss.appium.io/letter_avatar_proxy/v4/letter/p/cdc98d/32.png) [@pabloRam](https://discuss.appium.io/u/pabloRam)\
**Post date:** [July 11, 2017, 11:25pm UTC](https://discuss.appium.io/t/appium-test-on-ios-opens-and-close-the-application-over-and-over-again/8390/13 "2017-07-11T23:25:19Z")

</div>

Se me presento el mismo problema me podrian decir si realizando jailbreaking a mi dispositivo, se resuelva este problema.
