Skip to content

Commit

Permalink
Merge pull request #439 from alibaba/origin/features/ios_js_develop
Browse files Browse the repository at this point in the history
Origin/features/ios js develop
  • Loading branch information
jingcheng1988 authored Sep 25, 2023
2 parents 4f5df15 + 2d85492 commit 1e46d58
Show file tree
Hide file tree
Showing 156 changed files with 9,573 additions and 1,061 deletions.
5 changes: 5 additions & 0 deletions GaiaXJSiOS/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
Pods
Podfile.lock
.DS_Store

xcuserdata/
21 changes: 21 additions & 0 deletions GaiaXJSiOS/GaiaXJS.podspec
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
Pod::Spec.new do |s|

s.name = "GaiaXJS"
s.version = "0.1.0"
s.summary = "GaiaXJS"
s.description = "GaiaXJS"

s.homepage = "https://github.com/alibaba/GaiaX"


s.author = { "ronghui1219" => "[email protected]" }
s.platform = :ios, "9.0"
s.source = { :git => "https://github.com/alibaba/GaiaX.git", :tag => "#{s.version}" }

s.dependency 'GaiaXSocket'

s.source_files = 'GaiaXJS/**/*.{h,m,mm,c}'
s.resources = 'GaiaXJS/Resources/GaiaXJS.bundle'
s.xcconfig = { "ENABLE_BITCODE" => "NO" }
s.requires_arc = true
end
738 changes: 738 additions & 0 deletions GaiaXJSiOS/GaiaXJS.xcodeproj/project.pbxproj

Large diffs are not rendered by default.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>IDEDidComputeMac32BitWarning</key>
<true/>
</dict>
</plist>
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "1250"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
buildImplicitDependencies = "YES">
<BuildActionEntries>
<BuildActionEntry
buildForTesting = "YES"
buildForRunning = "YES"
buildForProfiling = "YES"
buildForArchiving = "YES"
buildForAnalyzing = "YES">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "BDF4225C264AA6910090A231"
BuildableName = "GaiaXJS.framework"
BlueprintName = "GaiaXJS"
ReferencedContainer = "container:GaiaXJS.xcodeproj">
</BuildableReference>
</BuildActionEntry>
</BuildActionEntries>
</BuildAction>
<TestAction
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
shouldUseLaunchSchemeArgsEnv = "YES">
<Testables>
</Testables>
</TestAction>
<LaunchAction
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
launchStyle = "0"
useCustomWorkingDirectory = "NO"
ignoresPersistentStateOnLaunch = "NO"
debugDocumentVersioning = "YES"
debugServiceExtension = "internal"
allowLocationSimulation = "YES">
</LaunchAction>
<ProfileAction
buildConfiguration = "Release"
shouldUseLaunchSchemeArgsEnv = "YES"
savedToolIdentifier = ""
useCustomWorkingDirectory = "NO"
debugDocumentVersioning = "YES">
<MacroExpansion>
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "BDF4225C264AA6910090A231"
BuildableName = "GaiaXJS.framework"
BlueprintName = "GaiaXJS"
ReferencedContainer = "container:GaiaXJS.xcodeproj">
</BuildableReference>
</MacroExpansion>
</ProfileAction>
<AnalyzeAction
buildConfiguration = "Debug">
</AnalyzeAction>
<ArchiveAction
buildConfiguration = "Release"
revealArchiveInOrganizer = "YES">
</ArchiveAction>
</Scheme>
10 changes: 10 additions & 0 deletions GaiaXJSiOS/GaiaXJS.xcworkspace/contents.xcworkspacedata

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

40 changes: 40 additions & 0 deletions GaiaXJSiOS/GaiaXJS/GaiaXJS.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
/*
* Copyright (c) 2022, Alibaba Group Holding Limited;
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/

#import <Foundation/Foundation.h>

//! Project version number for GaiaXJS.
FOUNDATION_EXPORT double GaiaXJSVersionNumber;

//! Project version string for GaiaXJS.
FOUNDATION_EXPORT const unsigned char GaiaXJSVersionString[];

// In this header, you should import all the public headers of your framework using statements like #import <GaiaXJS/PublicHeader.h>


#import <GaiaXJS/GaiaXJSDefines.h>
#import <GaiaXJS/GaiaXJSFactory.h>
#import <GaiaXJS/GaiaXJSComponent.h>
#import <GaiaXJS/GaiaXJSContext.h>
#import <GaiaXJS/GaiaXJSRuntime.h>
#import <GaiaXJS/GaiaXJSBridge.h>
#import <GaiaXJS/GaiaXJSHelper.h>
#import <GaiaXJS/GaiaXJSConfig.h>
#import <GaiaXJS/GaiaXJSBuiltInModule.h>
#import <GaiaXJS/GaiaXJSModulesImplDelegate.h>
#import <GaiaXJS/GaiaXJSExecPhaseImplDelegate.h>
#import <GaiaXJS/GaiaXJSHandler.h>
22 changes: 22 additions & 0 deletions GaiaXJSiOS/GaiaXJS/Info.plist
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleDevelopmentRegion</key>
<string>$(DEVELOPMENT_LANGUAGE)</string>
<key>CFBundleExecutable</key>
<string>$(EXECUTABLE_NAME)</string>
<key>CFBundleIdentifier</key>
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
<string>$(PRODUCT_NAME)</string>
<key>CFBundlePackageType</key>
<string>$(PRODUCT_BUNDLE_PACKAGE_TYPE)</string>
<key>CFBundleShortVersionString</key>
<string>1.0</string>
<key>CFBundleVersion</key>
<string>$(CURRENT_PROJECT_VERSION)</string>
</dict>
</plist>

Large diffs are not rendered by default.

31 changes: 31 additions & 0 deletions GaiaXJSiOS/GaiaXJS/src/GaiaXJSConfig.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
/*
* Copyright (c) 2022, Alibaba Group Holding Limited;
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/

#import <Foundation/Foundation.h>

NS_ASSUME_NONNULL_BEGIN

@interface GaiaXJSConfig : NSObject


+ (BOOL)isBreakPointDebugging;

+ (void)setBreakPointDebuggingEnabled:(BOOL)enabled;

@end

NS_ASSUME_NONNULL_END
48 changes: 48 additions & 0 deletions GaiaXJSiOS/GaiaXJS/src/GaiaXJSConfig.m
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
/*
* Copyright (c) 2022, Alibaba Group Holding Limited;
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/

#import "GaiaXJSConfig.h"
#import "GaiaXJSFactory.h"

@implementation GaiaXJSConfig


+ (BOOL)isBreakPointDebugging {
BOOL enabled = NO;
if ([[NSUserDefaults standardUserDefaults] objectForKey:@"GAIAX_JS_DEBUGGER_ENABLED"] != nil) {
enabled = [[NSUserDefaults standardUserDefaults] boolForKey:@"GAIAX_JS_DEBUGGER_ENABLED"];
}
return enabled;
}

+ (void)setBreakPointDebuggingEnabled:(BOOL)enabled {
if (enabled) {
[[NSUserDefaults standardUserDefaults] setBool:YES forKey:@"GAIAX_JS_DEBUGGER_ENABLED"];
} else {
[[NSUserDefaults standardUserDefaults] removeObjectForKey:@"GAIAX_JS_DEBUGGER_ENABLED"];
}
NSDictionary *userInfo = nil;
if (enabled) {
userInfo = @{@"engineType": @"breakpoint"};
}
if (enabled) {
[GaiaXJSFactory newContextByBizIdIfNeeded:@"common"];
}
[[NSNotificationCenter defaultCenter] postNotificationName:@"GAIAX_JS_ENGINE_TYPE_CHANGED" object:nil userInfo:userInfo];
}

@end
Loading

0 comments on commit 1e46d58

Please sign in to comment.