Skip to content

Commit 9d3db00

Browse files
committed
Fix: Invalid Bundle - A nested bundle contains simulator platform listed in CFBundleSupportedPlatforms Info.plist key.
1 parent bb10d9e commit 9d3db00

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

app/Main.hs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,8 @@ createBuildOptionSets :: XcodeScheme -> IO (Either (BuildError String) [Xcodebui
114114
createBuildOptionSets xcodeScheme = getSupportedPlatforms xcodeScheme >>>= createBuildOptionSets' xcodeScheme
115115

116116
createBuildOptionSets' :: XcodeScheme -> [String] -> IO (Either (BuildError String) [XcodebuildOptionSet])
117-
createBuildOptionSets' xcodeScheme platforms = return $ Right (map (createBuildOptionSet (project xcodeScheme) (scheme xcodeScheme) (configuration xcodeScheme)) platforms)
117+
createBuildOptionSets' xcodeScheme platforms =
118+
return $ Right (map (createBuildOptionSet (project xcodeScheme) (scheme xcodeScheme) (configuration xcodeScheme)) platforms)
118119

119120
createBuildOptionSet :: String -> String -> String -> String -> XcodebuildOptionSet
120121
createBuildOptionSet project scheme configuration platform = XcodebuildOptionSet project scheme platform configuration
@@ -127,7 +128,7 @@ getSupportedPlatforms xcodeScheme = do
127128

128129
getSupportedPlatforms' :: (MonadError (BuildError String) m) => XcodeScheme -> (ExitCode, String, String) -> m [String]
129130
getSupportedPlatforms' xcodeScheme (ExitSuccess, output, error) = case value of
130-
Just xs -> return $ words xs
131+
Just xs -> return $ reverse $ words xs
131132
Nothing -> throwError $ CreateBuildOptionSetsNoneSupportedPlatformsError ("scheme = " ++ error)
132133
where value = lookupBuildSettings "SUPPORTED_PLATFORMS" output
133134
getSupportedPlatforms' xcodeScheme (_, output, error) = throwError $ CreateBuildOptionSetsNoneSupportedPlatformsError (debugInfo xcodeScheme ++ " , " ++ error)

0 commit comments

Comments
 (0)