1

Morning Lads/ladies,

Shortest background I can write: In-house application for managing inventory, developer made redundant, no iOS Developers in the company, in comes me. I have no iOS developing experience, limited HTML/Javascript programming background. App runs on iOS v6.1.6, had to fish out Macbook from '08, now running El Capitan v10.11.6, and xCode v 6.4 (6E35b). I don't know what software/OS versions were used to develop the app/maintain it. Xcode is set to make the Project Format: Xcode 3.2-compatible.

Painfully, I have managed to locate prev. developers xcodeproj file, change to my developer profile for code signing, clean/build/archive/export a .ipa. This installs and the app runs on the intended devices.

Error is: Update Available, An updated application is available and will install now.

Only occurs when the user chooses his user profile (no password, just press User > Userprofile), a store (which section of the warehouse the items are), navigates around the app for a few seconds, presses the Home button and then reopens the application.

Currently, you have to uninstall (regular iOS uninstall)/reinstall via webserver to fix the issue. I have tried removing the files from the webserver after reinstall. The update is still prompted. The update will install the application successfully. If you open the app after this 'update' it will instantly prompt to update again.

My question is, if this isn't too vague, where could I look first to find the cause of this supposed 'loop' of updating?

EDIT1: *****Workflow:******
I've pulled the project file from the depths of the messy Stocktake folder(8 different distributions/versions scattered) using the last modified dates.

After loading the project into Xcode, the first item that demands attention is 'Validate Project Settings'. These including (under the sub-heading, bolded, Build Settings) Target 'StockTake' - Automatically Select Architectures, Project 'StockTake' - Automatically Select Architectures, Project 'StockTake' - Enable build active architecture only when debugging. I perform the changes and enable the subsequent popup asking to create a snapshot.

From the top, Stocktake Info, Deployment target, iOS Deployment Target [6 . 1]

Switch to Identity: Bundle Identifier is correct (has been changed from previous owner, I hack-jobbed this using notepad++ and navigating through the project files looking for anything related to him)
Version: [1.0] (i'll leave it as this this time round)
Build: [1.0]
I also make sure that the correct Team is selected.

BUILD SETTINGS

Architectures: Base SDK [Latest iOS (iOS 8.4)] Code signing: All either iOS Developer, or automatic.
Everything else is left as it is when I bring up the project file.
Clean, Clean Succeeded
Build, Build Stocktake: Succeeded
Then, Product, Destination, iOS Device
Archive
(Can see Stocktake, creation date, Version is what is listed above [1.0]) Validate, Choose correct team, Provisioning profile is what XC has created
iTunes Store operation failed (No suitable app records were found, check bundle identifier)
I leave this as is because I can use the export function in the organizer successfully anyway. Export, Save Ad Hoc Dep., Choose correct team, Export with XC-created prov. profile, Export
.ipa is created successfully.
I can go more in-depth, but I don't want to make a MASSIVE wall of text. I can upload a PDF of my in-depth findings somewhere if need be.

-(void) promptForUpdate
{
CCAlertView *alert = [[CCAlertView alloc] initWithTitle:@"Update Available" message:@"An updated application is available and will install now."];

[alert addButtonWithTitle:@"Ok" block:^{
    // open update URL in Web Browser
    if (![[UIApplication sharedApplication] openURL:kUpdaterURL]) {
        ALog(@"Failed to open app updater URL: %@", kUpdaterURL);
    }
}];

[alert show];

}

DJM
  • 61
  • 4
  • There is propably no chance to update your devices to newer iOS and build the app with newer Xcode? Also if you could provide more detail on how your distribution workflow is setup, it might help. – Losiowaty Mar 21 '17 at 23:31
  • Look for `CFBundleShortVersionString` (do a search in the project). Why? because the developer needs to be checking the currently installed version to determine if the update is available. If they are not, search for: `Update Available` and see where it pops up (in the code). – Brandon Mar 22 '17 at 00:04
  • @Losiowaty Unfortunately I can't as the iPod Touches can't be updated beyond v6.1.6 (4th Gen, 2012 I believe). As for my workflow, i'll place it in my question above. – DJM Mar 22 '17 at 01:00
  • @Brandon I've drummed down into the coding, particularly Stocktake-Info.plist (all inside the project file). I've got 2 branches (I believe thats the correct terminology.. I have never used xcode before) the difference between the local revision and the ex developers from 2012: Local: $(PRODUCT_BUNDLE_IDENTIFIER Ex-Developer: com.refiningnz.${PRODUCT_NAME:rfc1034identifier}. But isn't this saying the same thing in two different ways? I'll make a second comment once i've found Update Available. – DJM Mar 22 '17 at 01:40
  • Coming back to this tomorrow, but http://stackoverflow.com/questions/6851660/version-vs-build-in-xcode?rq=1 popped up in the sidebar and may be quintessential to figuring this out. – DJM Mar 22 '17 at 03:07

1 Answers1

0

I managed to solve this particular issue, we will see if any more issues pop up. There must have been a version mismatch between the appname.plist, and two web.config files related to an Oracle database this app connects to. We run two Maximo environments here, production and test. To fix this problem:
I opened appname.plist(Stocktake.plist in my case) and found the following coding:

            <key>bundle-version</key>
            <string>1.0</string>

I editted this to:

            <key>bundle-version</key>
            <string>1.16</string>

This was to match the two webconfig files, which looked like this:

<appSettings>
    <add key="webpages:Version" value="2.0.0.0" />
    <add key="webpages:Enabled" value="true" />
    <add key="PreserveLoginUrl" value="true" />
    <add key="ClientValidationEnabled" value="true" />
    <add key="UnobtrusiveJavaScriptEnabled" value="true" />
    <add key="MaximoConnection" value="provider=OraOLEDB.Oracle; data source=maximo75test; user id=; password=;" />
    <add key="BatchSize" value="200" />
    <add key="Version" value="1.16" />

I didn't touch the bundle-version string, because throughout each previous distribution I found, it had been 1.0. I had played around with the web.config Version file before, but was matching it to the App version I was creating in Xcode (I think the last version I tried creating was 1.6). I'm unsure why this worked, I haven't entered 1.16 into any of the .ipas I created, it was 1.16 when I initially started my troubleshooting,but it could have something to do with Maximo (perhaps Maximo is version 1.16?).

If anyone has trouble with this 'Update Available' loop, i'd suggest trying to find the last iteration of whatever application you're working with, and the latest version of the software you're integrating with, and set the version AND build to the same number before you export. It isn't best practice, but at least if you can get it working, you can slowly replace versions/builds until you find the problem.

This post (linked below) helped me come to the conclusion of changing the versions:
Version vs build in XCode

Community
  • 1
  • 1
DJM
  • 61
  • 4