-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
12 changed files
with
1,559 additions
and
1,412 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,10 +9,10 @@ | |
Pod::Spec.new do |spec| | ||
|
||
spec.name = "FlexHybridApp" | ||
spec.version = "1.0.2" | ||
spec.version = "1.0.3" | ||
spec.summary = "FlexibleHybridApp-iOS" | ||
spec.ios.deployment_target = '10.0' | ||
spec.swift_version = '5.5.1' | ||
spec.swift_version = '5.5.2' | ||
spec.author = { "Kyun-J" => "[email protected]" } | ||
spec.source = { :git => "https://github.com/Kyun-J/FlexHybridApp-iOS.git", :tag => "#{spec.version}" } | ||
spec.license = { :type => "BSD", :file => "license" } | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,104 +1,108 @@ | ||
<!DOCTYPE html> | ||
<html lang="ko"> | ||
<head> | ||
<head> | ||
<meta charset="UTF-8" /> | ||
<meta | ||
name="viewport" | ||
content="width=device-width, initial-scale=1, minimal-ui,, viewport-fit=cover, user-scalable=no" | ||
/> | ||
<script type="application/javascript" src="https://unpkg.com/vconsole/dist/vconsole.min.js"></script> | ||
<script | ||
type="application/javascript" | ||
src="https://cdn.jsdelivr.net/npm/[email protected]/dist/script.min.js" | ||
></script> | ||
</head> | ||
<script type="text/javascript"> | ||
let t = 0; | ||
const t1 = async () => { | ||
console.log('Send to Native --- ' + t); | ||
<script> | ||
let t = 0; | ||
const t1 = async () => { | ||
console.log("Send to Native --- " + t); | ||
const z = await $flex.test1(t); | ||
console.log('Return by Native with t1 --- ' + z); | ||
console.log("Return by Native with t1 --- " + z); | ||
t = z; | ||
} | ||
const t2 = async () => { | ||
await $flex.test2(); | ||
} | ||
const t3 = async () => { | ||
}; | ||
const t2 = async () => { | ||
await $flex.test2(); | ||
}; | ||
const t3 = async () => { | ||
const z = await $flex.testAction(); | ||
console.log(z); // {key1: "value1", key2: {subkey2: 1000.1, subkey1: ["dictionaryValue", 0.12]}, key3: ["arrayValue1", null], key4: true} | ||
console.log(typeof z) // Object | ||
} | ||
const t4 = async () => { | ||
console.log(typeof z); // Object | ||
}; | ||
const t4 = async () => { | ||
try { | ||
const z = await $flex.testReject1(); | ||
const z = await $flex.testReject1(); | ||
} catch (e) { | ||
console.log("testReject1"); | ||
console.log(e); | ||
console.log("testReject1"); | ||
console.log(e); | ||
} | ||
} | ||
const t5 = async () => { | ||
}; | ||
const t5 = async () => { | ||
try { | ||
const z = await $flex.testReject2(); | ||
const z = await $flex.testReject2(); | ||
} catch (e) { | ||
console.log("testReject2"); | ||
console.log(e); | ||
console.log("testReject2"); | ||
console.log(e); | ||
} | ||
} | ||
const t6 = async () => { | ||
const z = await $flex.testReceive({ "d1": 10, "d2": { "data": true } }); | ||
}; | ||
const t6 = async () => { | ||
const z = await $flex.testReceive({ d1: 10, d2: { data: true } }); | ||
console.log(z); | ||
} | ||
const t7 = async () => { | ||
}; | ||
const t7 = async () => { | ||
await $flex.modelTest1({ string: "string test", integer: 0 }); | ||
} | ||
const t8 = async () => { | ||
await $flex.modelTest2({ array: ["array"], dic: { dic: "dictionary" }, model: { bool: false } }); | ||
} | ||
const t9 = async () => { | ||
}; | ||
const t8 = async () => { | ||
await $flex.modelTest2({ | ||
array: ["array"], | ||
dic: { dic: "dictionary" }, | ||
model: { bool: false }, | ||
}); | ||
}; | ||
const t9 = async () => { | ||
const z = await $flex.modelTest3(); | ||
console.log(z); | ||
} | ||
const t10 = () => { | ||
window.location.href = "https://google.com"; | ||
}; | ||
const t11 = () => { | ||
window.location.href = "https://facebook.com"; | ||
}; | ||
const t12 = () => { | ||
window.location.href = "https://microsoft.com"; | ||
}; | ||
$flex.web.help = function(data) { | ||
console.log('Received by Native ---- ' + String(data)); | ||
return Promise.resolve(['Thanks Flex!', false]) | ||
} | ||
$flex.web.directTest = () => { | ||
console.log('direct test!!!!'); | ||
} | ||
// when $flex on ready..... | ||
window.onFlexLoad = function() { | ||
console.log('Flex Load Success!!'); | ||
} | ||
</script> | ||
<body style="width: 100%; height: 450px;"> | ||
<button onclick='t1()' style="width: 100%; height: 50px;">test1</button> | ||
<button onclick='t2()' style="width: 100%; height: 50px;">test2</button> | ||
<button onclick='t3()' style="width: 100%; height: 50px;">testAction</button> | ||
<button onclick='t4()' style="width: 100%; height: 50px;">testReject1</button> | ||
<button onclick='t5()' style="width: 100%; height: 50px;">testReject2</button> | ||
<button onclick='t6()' style="width: 100%; height: 50px;">testReceive</button> | ||
<button onclick='t7()' style="width: 100%; height: 50px;">modelTest1</button> | ||
<button onclick='t8()' style="width: 100%; height: 50px;">modelTest2</button> | ||
<button onclick='t9()' style="width: 100%; height: 50px;">modelTest3</button> | ||
<button onclick="t10()" style="width: 100%; height: 50px"> | ||
AllowUrl Test(google) | ||
</button> | ||
<button onclick="t11()" style="width: 100%; height: 50px"> | ||
AllowUrl Test(facebook) | ||
</button> | ||
<button onclick="t12()" style="width: 100%; height: 50px"> | ||
AllowUrl Test(microsoft) | ||
</button> | ||
<iframe src="./frame.html"></iframe> | ||
</body> | ||
}; | ||
const t10 = () => { | ||
window.location.href = "https://google.com"; | ||
}; | ||
const t11 = () => { | ||
window.location.href = "https://facebook.com"; | ||
}; | ||
const t12 = () => { | ||
window.location.href = "https://microsoft.com"; | ||
}; | ||
// when $flex on ready..... | ||
window.onFlexLoad = function () { | ||
console.log("Flex Load Success!!"); | ||
$flex.web.help = function (data) { | ||
console.log("Received by Native ---- " + String(data)); | ||
return Promise.resolve(["Thanks Flex!", false]); | ||
}; | ||
$flex.web.directTest = () => { | ||
console.log("direct test!!!!"); | ||
}; | ||
}; | ||
</script> | ||
</head> | ||
<body style="width: 100%; height: 450px"> | ||
<button onclick="t1()" style="width: 100%; height: 50px">test1</button> | ||
<button onclick="t2()" style="width: 100%; height: 50px">test2</button> | ||
<button onclick="t3()" style="width: 100%; height: 50px">testAction</button> | ||
<button onclick="t4()" style="width: 100%; height: 50px"> | ||
testReject1 | ||
</button> | ||
<button onclick="t5()" style="width: 100%; height: 50px"> | ||
testReject2 | ||
</button> | ||
<button onclick="t6()" style="width: 100%; height: 50px"> | ||
testReceive | ||
</button> | ||
<button onclick="t7()" style="width: 100%; height: 50px">modelTest1</button> | ||
<button onclick="t8()" style="width: 100%; height: 50px">modelTest2</button> | ||
<button onclick="t9()" style="width: 100%; height: 50px">modelTest3</button> | ||
<button onclick="t10()" style="width: 100%; height: 50px"> | ||
AllowUrl Test(google) | ||
</button> | ||
<button onclick="t11()" style="width: 100%; height: 50px"> | ||
AllowUrl Test(facebook) | ||
</button> | ||
<button onclick="t12()" style="width: 100%; height: 50px"> | ||
AllowUrl Test(microsoft) | ||
</button> | ||
<iframe src="./frame.html"></iframe> | ||
</body> | ||
</html> | ||
|
Oops, something went wrong.